#-*-coding:utf-8 -*-
from Marchines import C45
fr = open('mydata_2.csv',encoding='utf8')
lenses = [inst.strip().split(',') for inst in fr.readlines()]
print(lenses)
# exit()
lensesLables = ['附加','年龄','药物','散光','决策树']
LensesTree = C45.createTree(lenses,lensesLables)
# print(LensesTree)
C45.createPlot(LensesTree)
